#! /bin/sh
 
set -e
 
if [ "$1" = "configure" ] ; then
 
TABLES="professor tux"

if [ ! -d /var/games ]; then
        mkdir /var/games
fi

if [ ! -d /var/games/pinball ]; then
        mkdir /var/games/pinball
fi
 
for DIRS in $TABLES; do

	if [ ! -d /var/games/pinball/$DIRS ]; then
       		mkdir /var/games/pinball/$DIRS
	fi

	if [ -e /var/games/pinball/$DIRS/highscores ]; then
		continue
	fi

	touch /var/games/pinball/$DIRS/highscores
	chown root:games /var/games/pinball/$DIRS/highscores
	chmod 664 /var/games/pinball/$DIRS/highscores
done

fi

#DEBHELPER#
